import request from '@/utils/request'

// 获取-分页查询角色列表
export const getRoles = params => request.get('/sys/role', { params })

export const getRolesEnabled = () => request.get('/sys/role/list/enabled')

// 新增角色
export const addRoles = data => request.post('/sys/role', data)

export const editRoles = data => request.put(`/sys/role/${data.id}`, data)

export const delRoles = id => request.delete(`/sys/role/${id}`)

export const getEmployeeDetail = id => request.get(`/sys/user/${id}`)

export const assignRoles = data => request.put('/sys/user/assignRoles', data)

export const getPermissById = id => request.get('/sys/role/' + id)
